<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/views1/DTD/views1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui">

	<p:dialog header="Criar novo perfil" resizable="false"
		widgetVar="dlgCreatePerfil" width="300" appendToBody="true"
		modal="true">
		<h:form id="formCreate">
			<p:panel>
				<h:outputLabel value="Nome: "/>
				<p:inputText style="width: 185px;" required="true" requiredMessage="Informe um nome para o perfil" validator="#{perfilBean.validateNomePerfil}" value="#{perfilBean.perfilInstanceTemp.nome}"/>
				<div class="div-dialog-spacer">
					<p:separator />
					<br />
					<p:commandButton
						update="formPrincipal, formEdit, formCreate, formDesativar, formAtivar, formDelete"
						action="#{perfilBean.createPerfil}" value="Salvar"
						oncomplete="dlgCreatePerfil.hide()" ajax="true" />
					<p:commandButton type="button" value="Desistir"
						onclick="dlgCreatePerfil.hide()" />
				</div>
			</p:panel>
		</h:form>
	</p:dialog>
</f:view>